package com.gzhryc.servlet;

import java.nio.charset.Charset;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public abstract class Resource {

	protected Charset charset = Charset.forName("UTF-8");

	private String mediaType = "*/*";
	
	public Resource(){}
	
	public Resource(String mediaType){
		this.mediaType = mediaType;
	}
	
	public void setCharset(Charset charset) {
		this.charset = charset;
	}

	public Charset getCharset() {
		return this.charset;
	}
		
	public String getMediaType(){
		return this.mediaType;
	}
	
	public void setMediaType(String mediaType){
		this.mediaType = mediaType;
	}
	
	public abstract void export(HttpServletRequest request,HttpServletResponse response) throws Exception;
}
